﻿namespace DimensionsHelper.Common.Contracts.Metadata;

/// <summary>
///     枚举MDMDocument元数据对象类型。
/// </summary>
public enum ObjectType
{
    Unknown = 65535,

    /// <summary>
    ///     内部变量定义，xml tag 为 variable
    /// </summary>
    Variable = 0,

    /// <summary>
    ///     数字区间
    /// </summary>
    Array = 1,

    /// <summary>
    ///     网格设计定义，xml tag 为 grid
    /// </summary>
    Grid = 2,

    /// <summary>
    ///     下级字段定义集合，xml tag 为 class
    /// </summary>
    Class = 3,

    /// <summary>
    ///     分类类别特殊定义，xml tag 为 element
    /// </summary>
    Element = 4,

    /// <summary>
    ///     分类类别定义集合，xml tag 为 categories
    /// </summary>
    Elements = 5,

    /// <summary>
    ///     文本描述，xml tag 为 text
    /// </summary>
    Label = 6,

    /// <summary>
    ///     xml tag 为 design tag 下的 loop、grid、variable
    /// </summary>
    Field = 7,

    /// <summary>
    ///     xml tag 为 helperfields
    /// </summary>
    HelperFields = 8,

    /// <summary>
    ///     字段集合，xml tag 为 design 内的 fields
    /// </summary>
    Fields = 9,

    /// <summary>
    ///     类型定义集合，xml tag 为 design 内的 types
    /// </summary>
    Types = 10,

    /// <summary>
    ///     元数据附加属性对象， xml tag 为 property
    /// </summary>
    Property = 11,

    /// <summary>
    ///     元数据附加属性集合, xml tag 为 properties
    /// </summary>
    Properties = 12,

    /// <summary>
    ///     路由对象，xml tag 为 routing
    /// </summary>
    Routing = 13,

    /// <summary>
    ///     上下文对象集合，xml tag 为 contexts
    /// </summary>
    Contexts = 14,

    /// <summary>
    ///     语言定义集合，xml tag 为 languages
    /// </summary>
    Languages = 15,

    /// <summary>
    ///     级别对象
    /// </summary>
    LevelObject = 16,

    /// <summary>
    ///     变量实例对象，xml tag 为 varinstance
    /// </summary>
    VariableInstance = 17,

    /// <summary>
    ///     上下文元素，xml tag 为 ritem
    /// </summary>
    RoutingItem = 18,

    /// <summary>
    ///     xml tag 为 compound
    /// </summary>
    Compound = 19,

    /// <summary>
    ///     分类元素实例，xml tag 为 variable 内的 element
    /// </summary>
    ElementInstance = 20,

    /// <summary>
    ///     分类元素实例集合，xml tag 为 variable 内的 categories
    /// </summary>
    ElementInstances = 21,

    /// <summary>
    ///     语言配置对象，xml tag 为 language
    /// </summary>
    Language = 22,

    /// <summary>
    ///     路由对象集合
    /// </summary>
    RoutingItems = 23,

    /// <summary>
    ///     区间对象
    /// </summary>
    Ranges = 24,

    /// <summary>
    ///     Element中 ElementType 为 <see cref="ElementType.Category" /> 的对象集合。
    /// </summary>
    Categories = 25,

    /// <summary>
    ///     分类值值映射表，xml tag 为 categorymap
    /// </summary>
    CategoryMap = 26,

    /// <summary>
    ///     数据源集合，xml tag 为 datasources
    /// </summary>
    DataSources = 27,

    /// <summary>
    ///     MDM文档
    /// </summary>
    Document = 28,

    /// <summary>
    ///     版本对象，xml tag 为 version
    /// </summary>
    Version = 29,

    /// <summary>
    ///     版本集合，xml tag 为 versions
    /// </summary>
    Versions = 30,

    /// <summary>
    ///     变量定义集合，xml tag 为 variables
    /// </summary>
    Variables = 31,

    /// <summary>
    ///     数据源配置，xml tag 为 connection
    /// </summary>
    DataSource = 32,

    /// <summary>
    ///     导入数据映射表，xml 成员为 connection 下所有的 var tag
    /// </summary>
    AliasMap = 33,

    /// <summary>
    ///     索引对象
    /// </summary>
    IndexElement = 34,

    /// <summary>
    ///     索引集合
    /// </summary>
    IndicesElements = 35,

    /// <summary>
    ///     页面字段集合，xml tag 为 pages
    /// </summary>
    Pages = 36,

    /// <summary>
    ///     参数列表
    /// </summary>
    Parameters = 37,

    /// <summary>
    ///     页面字段定义，xml tag 为 page
    /// </summary>
    Page = 38,

    /// <summary>
    ///     元素集合
    /// </summary>
    Items = 39,

    /// <summary>
    ///     上下文对象，xml tag 为 context
    /// </summary>
    Context = 40,

    /// <summary>
    ///     上下文内部集合，xml tag 为 alternative
    /// </summary>
    ContextAlternatives = 41,

    /// <summary>
    ///     元素列表
    /// </summary>
    ElementList = 42,

    /// <summary>
    ///     路由中的跳转对象
    /// </summary>
    Goto = 43,

    /// <summary>
    ///     模板对象，xml tag 为 template
    /// </summary>
    Template = 44,

    /// <summary>
    ///     模板对象集合，xml tag 为 templates
    /// </summary>
    Templates = 45,

    /// <summary>
    ///     样式对象，xml tag 为 property
    /// </summary>
    Style = 46,

    /// <summary>
    ///     单行注释，xml tag 为 property
    /// </summary>
    Note = 47,

    /// <summary>
    ///     多行注释，xml tag 为 notes
    /// </summary>
    Notes = 48,

    /// <summary>
    ///     路由中的if语句
    /// </summary>
    IfBlock = 49,

    /// <summary>
    ///     条件路由
    /// </summary>
    ConditionalRouting = 50,

    /// <summary>
    ///     数据库分类集合
    /// </summary>
    DbElements = 51,

    /// <summary>
    ///     数据库数据源
    /// </summary>
    DbQuestionDataProvider = 52
}